from datetime import datetime

from sqlalchemy import Column, DateTime, String

from config.database import Base


class SysGoofishClient(Base):
    """
    字典类型表
    """

    __tablename__ = 'sys_goofish_client'
    name = Column(String(100), nullable=True, default='', comment='名称')
    client_id = Column(String(100), nullable=True, default='', comment='客户端id')
    description = Column(String(500), nullable=True, default='', comment='描述')
    client_secret = Column(String(100), nullable=True, default='', comment='客户端密钥')
    status = Column(String(1), nullable=True, default='0', comment='状态（0正常 1停用）')
    create_time = Column(DateTime, nullable=True, default=datetime.now(), comment='创建时间')
    update_time = Column(DateTime, nullable=True, default=datetime.now(), comment='更新时间', onupdate=datetime.now)
    update_by = Column(String(64), nullable=True, default='', comment='更新者')